<h1>Edit Page</h1>
<?php
echo $this->Form->create('Page');
echo $this->Form->input('title');

?>
<div class="images">
    <?php
    $i = 0;
    foreach ($images as $image) {
        echo '<label for="PageImage' . $i . '">';
        echo '<img src="' . $image . '"/>';
        echo '<input type="radio" name="data[Page][image]" id="PageImage' . $i . '" value="' . $image . '"/>';
        echo '</label>';
        $i++;
    }
    ?>
</div>

<?php
/*
echo $this->Form->input(
    'id_cat',
    array(
        'options' => $categories,
        'empty' => '(choose one)',
        'data-url' => '/AdminPages/getSubCat.json'
    )
);

$options = array(
    'options' => $sub_categories,
    'empty' => '(choose one)'
);
if (count($sub_categories) == 0) {
    $options['disabled'] = 'disabled';
}

echo $this->Form->input('id_subcat', $options);

echo $this->Form->input('body', array('rows' => '3'));
*/

echo $this->Form->input('id', array('type' => 'hidden'));
echo $this->Form->submit('Valider', array('class' => 'button'));
echo $this->Form->end();
?>